package com.lagou.model;

import com.lagou.util.ConstEnum;

import java.io.Serializable;

/**
 * 用户信息类
 */
public class UserMessage implements Serializable {
    private static final long serialVersionUID = -4976144901190674360L;

    /**
     * 消息类型，枚举类型
     */
    private ConstEnum type;
    /**
     * 用户对象信息
     */
    private User user;

    public UserMessage() {
    }

    public UserMessage(ConstEnum type, User user) {
        this.type = type;
        this.user = user;
    }

    public ConstEnum getType() {
        return type;
    }

    public void setType(ConstEnum type) {
        this.type = type;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    @Override
    public String toString() {
        return "{消息类型：" + type.getValue() + "，用户信息：" + user + '}';
    }
}
